package system

import (
	"github.com/flipped-aurora/gin-vue-admin/server/middleware"
	"github.com/gin-gonic/gin"
)

type DictionaryDetailRouter struct{}

func (s *DictionaryDetailRouter) InitSysDictionaryDetailRouter(Router *gin.RouterGroup) {
	dictionaryDetailRouter := Router.Group("sysDictionaryDetail").Use(middleware.OperationRecord())
	dictionaryDetailRouterWithoutRecord := Router.Group("sysDictionaryDetail")
	{
		dictionaryDetailRouter.POST("createSysDictionaryDetail", dictionaryDetailApi.CreateSysDictionaryDetail)   // 新建SysDictionaryDetail
		dictionaryDetailRouter.DELETE("deleteSysDictionaryDetail", dictionaryDetailApi.DeleteSysDictionaryDetail) // 删除SysDictionaryDetail
		dictionaryDetailRouter.PUT("updateSysDictionaryDetail", dictionaryDetailApi.UpdateSysDictionaryDetail)    // 更新SysDictionaryDetail
	}
	{
		dictionaryDetailRouterWithoutRecord.GET("findSysDictionaryDetail", dictionaryDetailApi.FindSysDictionaryDetail) // 根据ID获取SysDictionaryDetail
	}
}

// InitSysDictionaryDetailPublicRouter 初始化字典详情公开路由（无需鉴权）
func (s *DictionaryDetailRouter) InitSysDictionaryDetailPublicRouter(Router *gin.RouterGroup) {
	dictionaryDetailPublicRouter := Router.Group("sysDictionaryDetail")
	{
		dictionaryDetailPublicRouter.GET("getSysDictionaryDetailList", dictionaryDetailApi.GetSysDictionaryDetailList)         // 获取SysDictionaryDetail列表（公开接口）
		dictionaryDetailPublicRouter.GET("getSysDictionaryDetailTree", dictionaryDetailApi.GetSysDictionaryDetailTree)         // 获取级联树形结构的字典详情（公开接口）
		dictionaryDetailPublicRouter.GET("getFullSysDictionaryDetailTree", dictionaryDetailApi.GetFullSysDictionaryDetailTree) // 获取完整的级联树形结构字典详情（公开接口）
	}
}
